/*
 * Merger.h
 *
 *  Created on: Apr 3, 2012
 *      Author: victor
 */

#ifndef MERGER_H_
#define MERGER_H_

#include "conc/Thread.h"
#include "Buffer/TripleBuffer.h"
#include "IOCard.h"
#include "Buffer/CameraBuffer.h"
#include <iostream>

class Merger : public Thread {
	TripleBuffer * buffers[3];
	IOCard* ioCard;
	int cameras[3];
	int amountOfCameras;

public:
	Merger(IOCard*);
	~Merger();
	void sendImagesToIOCard();
	void sendImageToIOCard(TripleBuffer*);
	void receiveImage(int, byte);
	void checkInCamera(int);
	void run();

};


#endif /* MERGER_H_ */
